package com.bto.solar.work.constant;

/**
 * Token的Key常量
 * 
 * @author ruoyi
 */
public class TokenConstants
{
    /**
     * 令牌自定义标识
     */
    public static final String AUTHENTICATION = "Authorization";

    /**
     * 令牌前缀
     */
    public static final String PREFIX = "Bearer ";
    /**
     * 令牌前缀
     */
    public static final String TOKEN = "bto:solar-order:token:";

    /**
     * 令牌前缀
     */
    public static final String REFRESH_TOKEN = "bto:solar-order:refresh_token:";

    /**
     * 令牌秘钥
     */
    public final static String SECRET = "bto-solar";

    /**
     *1天
     */
    public static final Long AUTH_TOKEN_EXPIRE_MIN = 60*24L;


    /**
     * 15天
     */
    public static final Long AUTH_REFRESH_TOKEN_EXPIRE_MIN = 60*24*15L;

    /**
     * 短信有效期为5分钟
     */
    public static final Long SMS_EXPIRE_MIN = 5L;

    /**
     * 数字验证的前缀
     */
    public static final String SMS_CODE_LOGIN_KEY = "bto:solar-order:code:LOGIN:";


    /**
     * 用户ID字段
     */
    public static final String DETAILS_USER_ID = "uid";

    /**
     * 用户名字段
     */
    public static final String DETAILS_USERNAME = "user_name";

    /**
     * 用户ID字段
     */
    public static final String DETAILS_USER_PHONE = "phone";

    /**
     * 客户端类型
     */
    public static final String CLIENT_TYPE = "client_type";

    /**
     * 用户角色
     */
    public static final String USER_ROLE = "user_role";
    /**
     * 用户权限
     */
    public static final String USER_PERMISSION = "user_permission";


    /**
     * 授权信息字段
     */
    public static final String AUTHORIZATION_HEADER = "authorization";




    /*******************************分割线*********************************/

    /**
     * 请求来源
     */
    public static final String FROM_SOURCE = "from-source";

    /**
     * 内部请求
     */
    public static final String INNER = "inner";

    /**
     * 用户标识
     */
    public static final String USER_KEY = "user_key";

    /**
     * 登录用户
     */
    public static final String LOGIN_USER = "login_user";





}
